<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Caffe: include/caffe/layers/lstm_layer.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Caffe
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4b7f3da7c7b4301d805dae0326fb91b7.html">caffe</a></li><li class="navelem"><a class="el" href="dir_b9606a76d4acbf8f90a06a4a51ec8b9e.html">layers</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">lstm_layer.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CAFFE_LSTM_LAYER_HPP_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CAFFE_LSTM_LAYER_HPP_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;caffe/blob.hpp&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;caffe/common.hpp&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;caffe/layer.hpp&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;caffe/layers/recurrent_layer.hpp&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;caffe/net.hpp&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;caffe/proto/caffe.pb.h&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecaffe.html">caffe</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="classcaffe_1_1RecurrentLayer.html">   17</a></span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt; <span class="keyword">class </span><a class="code" href="classcaffe_1_1RecurrentLayer.html">RecurrentLayer</a>;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt;</div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMLayer.html">   48</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcaffe_1_1LSTMLayer.html">LSTMLayer</a> : <span class="keyword">public</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html">RecurrentLayer</a>&lt;Dtype&gt; {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classcaffe_1_1LSTMLayer.html">LSTMLayer</a>(<span class="keyword">const</span> LayerParameter&amp; param)</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;      : <a class="code" href="classcaffe_1_1RecurrentLayer.html">RecurrentLayer&lt;Dtype&gt;</a>(param) {}</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMLayer.html#a971791d82dee1ec9cdd0625ee1579e22">   53</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classcaffe_1_1LSTMLayer.html#a971791d82dee1ec9cdd0625ee1579e22">type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="stringliteral">&quot;LSTM&quot;</span>; }</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1LSTMLayer.html#a66285fd55798aa17b8d5d0b7f30f8346">FillUnrolledNet</a>(NetParameter* net_param) <span class="keyword">const</span>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1LSTMLayer.html#a03c6f191bd5a314981514b9bbd3ce450">RecurrentInputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span>;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1LSTMLayer.html#a1ea6a5c2801b1463604bc67c4dbf1df1">RecurrentOutputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1LSTMLayer.html#ab3978704db58d6f2a43d3cfccec9853b">RecurrentInputShapes</a>(vector&lt;BlobShape&gt;* shapes) <span class="keyword">const</span>;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1LSTMLayer.html#a86acb620f5a10c6caa2661398e0b4f5a">OutputBlobNames</a>(vector&lt;string&gt;* names) <span class="keyword">const</span>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;};</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> Dtype&gt;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html">   69</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcaffe_1_1LSTMUnitLayer.html">LSTMUnitLayer</a> : <span class="keyword">public</span> <a class="code" href="classcaffe_1_1Layer.html">Layer</a>&lt;Dtype&gt; {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classcaffe_1_1LSTMUnitLayer.html">LSTMUnitLayer</a>(<span class="keyword">const</span> LayerParameter&amp; param)</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;      : <a class="code" href="classcaffe_1_1Layer.html">Layer&lt;Dtype&gt;</a>(param) {}</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#aba6011a9cbb18e38a8596aa5dbb44723">Reshape</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html#a684fc0eb2d2277651b26609ec7314747">   76</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classcaffe_1_1LSTMUnitLayer.html#a684fc0eb2d2277651b26609ec7314747">type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="stringliteral">&quot;LSTMUnit&quot;</span>; }</div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html#a087f5f5b0e6c50d98e7a7d04aa35f1b9">   77</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1LSTMUnitLayer.html#a087f5f5b0e6c50d98e7a7d04aa35f1b9">ExactNumBottomBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 3; }</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html#a5f56fd304b6581697cbf309ebb8bc9b7">   78</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1LSTMUnitLayer.html#a5f56fd304b6581697cbf309ebb8bc9b7">ExactNumTopBlobs</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 2; }</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html#a9c46167bc8b96b28196bc24a5515b531">   80</a></span>&#160;  <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classcaffe_1_1LSTMUnitLayer.html#a9c46167bc8b96b28196bc24a5515b531">AllowForceBackward</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> bottom_index)<span class="keyword"> const </span>{</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="comment">// Can&#39;t propagate to sequence continuation indicators.</span></div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keywordflow">return</span> bottom_index != 2;</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; <span class="keyword">protected</span>:</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a9f0e34d7534fac027c640e66f55a18d2">Forward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#afb4cdbb38b24d2a2ccb14cebc4e1018b">Forward_gpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom,</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;      <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1RecurrentLayer.html#a634f73d33c81cc8f8486659998ed45c6">Backward_cpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top,</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;      <span class="keyword">const</span> vector&lt;bool&gt;&amp; propagate_down, <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classcaffe_1_1Layer.html#a6faee52af6250a38d1b879008257f5a7">Backward_gpu</a>(<span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; top,</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;      <span class="keyword">const</span> vector&lt;bool&gt;&amp; propagate_down, <span class="keyword">const</span> vector&lt;<a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a>*&gt;&amp; bottom);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classcaffe_1_1LSTMUnitLayer.html#a7ffcad2a4e6ca83f03cc88dffa32b7ca">  148</a></span>&#160;  <span class="keywordtype">int</span> <a class="code" href="classcaffe_1_1LSTMUnitLayer.html#a7ffcad2a4e6ca83f03cc88dffa32b7ca">hidden_dim_</a>;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <a class="code" href="classcaffe_1_1Blob.html">Blob&lt;Dtype&gt;</a> X_acts_;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;};</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;}  <span class="comment">// namespace caffe</span></div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="preprocessor">#endif  // CAFFE_LSTM_LAYER_HPP_</span></div><div class="ttc" id="classcaffe_1_1Layer_html_a6faee52af6250a38d1b879008257f5a7"><div class="ttname"><a href="classcaffe_1_1Layer.html#a6faee52af6250a38d1b879008257f5a7">caffe::Layer::Backward_gpu</a></div><div class="ttdeci">virtual void Backward_gpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top, const vector&lt; bool &gt; &amp;propagate_down, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom)</div><div class="ttdoc">Using the GPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...</div><div class="ttdef"><b>Definition:</b> layer.hpp:334</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html">caffe::LSTMLayer</a></div><div class="ttdoc">Processes sequential inputs using a &quot;Long Short-Term Memory&quot; (LSTM) [1] style recurrent neural networ...</div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:48</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_ab3978704db58d6f2a43d3cfccec9853b"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#ab3978704db58d6f2a43d3cfccec9853b">caffe::LSTMLayer::RecurrentInputShapes</a></div><div class="ttdeci">virtual void RecurrentInputShapes(vector&lt; BlobShape &gt; *shapes) const</div><div class="ttdoc">Fills shapes with the shapes of the recurrent input Blob&amp;s. Subclasses should define this – see RNNL...</div><div class="ttdef"><b>Definition:</b> lstm_layer.cpp:28</div></div>
<div class="ttc" id="classcaffe_1_1Layer_html"><div class="ttname"><a href="classcaffe_1_1Layer.html">caffe::Layer</a></div><div class="ttdoc">An interface for the units of computation which can be composed into a Net. </div><div class="ttdef"><b>Definition:</b> layer.hpp:33</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_a1ea6a5c2801b1463604bc67c4dbf1df1"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#a1ea6a5c2801b1463604bc67c4dbf1df1">caffe::LSTMLayer::RecurrentOutputBlobNames</a></div><div class="ttdeci">virtual void RecurrentOutputBlobNames(vector&lt; string &gt; *names) const</div><div class="ttdoc">Fills names with the names of the Tth timestep recurrent output Blob&amp;s. Subclasses should define this...</div><div class="ttdef"><b>Definition:</b> lstm_layer.cpp:21</div></div>
<div class="ttc" id="namespacecaffe_html"><div class="ttname"><a href="namespacecaffe.html">caffe</a></div><div class="ttdoc">A layer factory that allows one to register layers. During runtime, registered layers can be called b...</div><div class="ttdef"><b>Definition:</b> blob.hpp:14</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html">caffe::RecurrentLayer</a></div><div class="ttdoc">An abstract class for implementing recurrent behavior inside of an unrolled network. This Layer type cannot be instantiated – instead, you should use one of its implementations which defines the recurrent architecture, such as RNNLayer or LSTMLayer. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:17</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a9f0e34d7534fac027c640e66f55a18d2"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a9f0e34d7534fac027c640e66f55a18d2">caffe::RecurrentLayer::Forward_cpu</a></div><div class="ttdeci">virtual void Forward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:245</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_afb4cdbb38b24d2a2ccb14cebc4e1018b"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#afb4cdbb38b24d2a2ccb14cebc4e1018b">caffe::RecurrentLayer::Forward_gpu</a></div><div class="ttdeci">virtual void Forward_gpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Using the GPU device, compute the layer output. Fall back to Forward_cpu() if unavailable. </div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_a03c6f191bd5a314981514b9bbd3ce450"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#a03c6f191bd5a314981514b9bbd3ce450">caffe::LSTMLayer::RecurrentInputBlobNames</a></div><div class="ttdeci">virtual void RecurrentInputBlobNames(vector&lt; string &gt; *names) const</div><div class="ttdoc">Fills names with the names of the 0th timestep recurrent input Blob&amp;s. Subclasses should define this ...</div><div class="ttdef"><b>Definition:</b> lstm_layer.cpp:14</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_a66285fd55798aa17b8d5d0b7f30f8346"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#a66285fd55798aa17b8d5d0b7f30f8346">caffe::LSTMLayer::FillUnrolledNet</a></div><div class="ttdeci">virtual void FillUnrolledNet(NetParameter *net_param) const</div><div class="ttdoc">Fills net_param with the recurrent network architecture. Subclasses should define this – see RNNLaye...</div><div class="ttdef"><b>Definition:</b> lstm_layer.cpp:47</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html_a684fc0eb2d2277651b26609ec7314747"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html#a684fc0eb2d2277651b26609ec7314747">caffe::LSTMUnitLayer::type</a></div><div class="ttdeci">virtual const char * type() const</div><div class="ttdoc">Returns the layer type. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:76</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html_a087f5f5b0e6c50d98e7a7d04aa35f1b9"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html#a087f5f5b0e6c50d98e7a7d04aa35f1b9">caffe::LSTMUnitLayer::ExactNumBottomBlobs</a></div><div class="ttdeci">virtual int ExactNumBottomBlobs() const</div><div class="ttdoc">Returns the exact number of bottom blobs required by the layer, or -1 if no exact number is required...</div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:77</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html_a9c46167bc8b96b28196bc24a5515b531"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html#a9c46167bc8b96b28196bc24a5515b531">caffe::LSTMUnitLayer::AllowForceBackward</a></div><div class="ttdeci">virtual bool AllowForceBackward(const int bottom_index) const</div><div class="ttdoc">Return whether to allow force_backward for a given bottom blob index. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:80</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html_a7ffcad2a4e6ca83f03cc88dffa32b7ca"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html#a7ffcad2a4e6ca83f03cc88dffa32b7ca">caffe::LSTMUnitLayer::hidden_dim_</a></div><div class="ttdeci">int hidden_dim_</div><div class="ttdoc">The hidden and output dimension. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:148</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_a86acb620f5a10c6caa2661398e0b4f5a"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#a86acb620f5a10c6caa2661398e0b4f5a">caffe::LSTMLayer::OutputBlobNames</a></div><div class="ttdeci">virtual void OutputBlobNames(vector&lt; string &gt; *names) const</div><div class="ttdoc">Fills names with the names of the output blobs, concatenated across all timesteps. Should return a name for each top Blob. Subclasses should define this – see RNNLayer and LSTMLayer for examples. </div><div class="ttdef"><b>Definition:</b> lstm_layer.cpp:41</div></div>
<div class="ttc" id="classcaffe_1_1LSTMLayer_html_a971791d82dee1ec9cdd0625ee1579e22"><div class="ttname"><a href="classcaffe_1_1LSTMLayer.html#a971791d82dee1ec9cdd0625ee1579e22">caffe::LSTMLayer::type</a></div><div class="ttdeci">virtual const char * type() const</div><div class="ttdoc">Returns the layer type. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:53</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_aba6011a9cbb18e38a8596aa5dbb44723"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#aba6011a9cbb18e38a8596aa5dbb44723">caffe::RecurrentLayer::Reshape</a></div><div class="ttdeci">virtual void Reshape(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top)</div><div class="ttdoc">Adjust the shapes of top blobs and internal buffers to accommodate the shapes of the bottom blobs...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:183</div></div>
<div class="ttc" id="classcaffe_1_1RecurrentLayer_html_a634f73d33c81cc8f8486659998ed45c6"><div class="ttname"><a href="classcaffe_1_1RecurrentLayer.html#a634f73d33c81cc8f8486659998ed45c6">caffe::RecurrentLayer::Backward_cpu</a></div><div class="ttdeci">virtual void Backward_cpu(const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;top, const vector&lt; bool &gt; &amp;propagate_down, const vector&lt; Blob&lt; Dtype &gt; *&gt; &amp;bottom)</div><div class="ttdoc">Using the CPU device, compute the gradients for any parameters and for the bottom blobs if propagate_...</div><div class="ttdef"><b>Definition:</b> recurrent_layer.cpp:277</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html">caffe::LSTMUnitLayer</a></div><div class="ttdoc">A helper for LSTMLayer: computes a single timestep of the non-linearity of the LSTM, producing the updated cell and hidden states. </div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:69</div></div>
<div class="ttc" id="classcaffe_1_1LSTMUnitLayer_html_a5f56fd304b6581697cbf309ebb8bc9b7"><div class="ttname"><a href="classcaffe_1_1LSTMUnitLayer.html#a5f56fd304b6581697cbf309ebb8bc9b7">caffe::LSTMUnitLayer::ExactNumTopBlobs</a></div><div class="ttdeci">virtual int ExactNumTopBlobs() const</div><div class="ttdoc">Returns the exact number of top blobs required by the layer, or -1 if no exact number is required...</div><div class="ttdef"><b>Definition:</b> lstm_layer.hpp:78</div></div>
<div class="ttc" id="classcaffe_1_1Blob_html"><div class="ttname"><a href="classcaffe_1_1Blob.html">caffe::Blob</a></div><div class="ttdoc">A wrapper around SyncedMemory holders serving as the basic computational unit through which Layers...</div><div class="ttdef"><b>Definition:</b> blob.hpp:24</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Aug 3 2017 23:11:19 for Caffe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
